package com.xd.core.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.xd.core.api.entity.RepaymentOrderInfo;
import com.xd.core.company.dto.HomeQueryDto;
import com.xd.core.company.vo.ReceiveCounts;
import com.xd.core.finance.dto.RepayManageDto;
import com.xd.core.finance.vo.RepayManageVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 还款订单信息 Mapper 接口
 * </p>
 *
 * @author ZX
 * @since 2025-03-11
 */
public interface RepaymentOrderInfoMapper extends BaseMapper<RepaymentOrderInfo> {

    void updateStatus(String transId, String status, String failCause, BigDecimal FWMoney);

    void updateShareStatus(String transId);

    ReceiveCounts getReceiveCounts(@Param("query") HomeQueryDto query,
                                   @Param("companyId") Integer companyId,
                                   @Param("type") String type);

    Page<RepayManageVo> getRepayManage(@Param("dto") RepayManageDto dto, @Param("companyId") Integer companyId, @Param("userIds") List<Integer> userIds);

    Integer getRepayOrderStatus(Integer repayId);

    Integer getDebtOrderStatus(Integer debtId);
}
